home *** CD-ROM | disk | FTP | other *** search
- property pSp, Mem, pSprChan, pEventType, pControlType
-
- on getPropertyDescriptionList
- d = [:]
- addProp(d, #pEventType, [#default: "MouseClick", #format: #string, #range: ["MouseClick", "MouseOver", "Automatic"], #comment: "Choose Event Type"])
- addProp(d, #pControlType, [#default: "Play", #format: #string, #range: ["Play", "Stop", "Rewind", "FastForward", "Reset", "Pause"], #comment: "Choose Control Type"])
- addProp(d, #pSprChan, [#default: 1, #format: #integer, #comment: "Sprite Channel of Movie"])
- return d
- end
-
- on beginSprite me
- pSp = me.spriteNum
- Mem = the memberNum of sprite pSp
- end
-
- on prepareFrame me
- if pEventType = "Automatic" then
- case pControlType of
- "Play":
- sprite(pSprChan).movieRate = 1
- "Stop":
- sprite(pSprChan).movieRate = 0
- sprite(pSprChan).movieTime = 0
- "Rewind":
- sprite(pSprChan).movieRate = -2
- "FastForward":
- sprite(pSprChan).movieRate = 2
- "Reset":
- sprite(pSprChan).movieTime = 0
- "Pause":
- if sprite(pSprChan).movieRate = 1 then
- sprite(pSprChan).movieRate = 0
- else
- sprite(pSprChan).movieRate = 1
- end if
- end case
- end if
- end
-
- on mouseWithin me
- if pEventType = "MouseOver" then
- case pControlType of
- "Play":
- sprite(pSprChan).movieRate = 1
- "Stop":
- sprite(pSprChan).movieRate = 0
- sprite(pSprChan).movieTime = 0
- "Rewind":
- sprite(pSprChan).movieRate = -2
- "FastForward":
- sprite(pSprChan).movieRate = 2
- "Reset":
- sprite(pSprChan).movieTime = 0
- "Pause":
- if sprite(pSprChan).movieRate = 1 then
- sprite(pSprChan).movieRate = 0
- else
- sprite(pSprChan).movieRate = 1
- end if
- end case
- end if
- end
-
- on mouseLeave me
- if pEventType = "MouseOver" then
- case pControlType of
- "Play":
- sprite(pSprChan).movieRate = 1
- "Stop":
- sprite(pSprChan).movieRate = 0
- sprite(pSprChan).movieTime = 0
- "Rewind":
- sprite(pSprChan).movieRate = -2
- "FastForward":
- sprite(pSprChan).movieRate = 2
- "Reset":
- sprite(pSprChan).movieTime = 0
- "Pause":
- if sprite(pSprChan).movieRate = 1 then
- sprite(pSprChan).movieRate = 0
- else
- sprite(pSprChan).movieRate = 1
- end if
- end case
- end if
- end
-
- on mouseUp me
- if pEventType = "MouseClick" then
- case pControlType of
- "Play":
- sprite(pSprChan).movieRate = 1
- "Stop":
- sprite(pSprChan).movieRate = 0
- sprite(pSprChan).movieTime = 0
- "Rewind":
- sprite(pSprChan).movieRate = -2
- "FastForward":
- sprite(pSprChan).movieRate = 2
- "Reset":
- sprite(pSprChan).movieTime = 0
- "Pause":
- if sprite(pSprChan).movieRate = 1 then
- sprite(pSprChan).movieRate = 0
- else
- sprite(pSprChan).movieRate = 1
- end if
- end case
- end if
- end
-
- on getBehaviorDescription
- description = "Controls QT for Play,FF,RW, Reset, Stop and Pause"
- return description
- end
-